package com.example.houshaung.springBootProject;

public class Singleton {

	//构造函数
	private Singleton() {
	
	}
	//只能有一个对象
	private static Singleton Singleton = null;
	
	//实例化对象
	public static Singleton getSingleton() {
		if(Singleton == null){
			Singleton = new Singleton();
		}
		return Singleton;
	}
}
